public class M5 {
    public static void main(String[] args) {
        new C();
    }
}


class A {
    {
        System.out.println("A - 代码块");
    }
    static {
        System.out.println("A - static代码块");
    }

    public A(){
        System.out.println("A - 构造器");
    }
}

class B extends A{
    {
        System.out.println("B - 代码块");
    }
    static {
        System.out.println("B - static代码块");
    }

    public B(){
        System.out.println("B - 构造器");
    }
}

class C extends B{
    {
        System.out.println("C - 代码块");
    }
    static {
        System.out.println("C - static代码块");
    }

    public C(){
        System.out.println("C - 构造器");
    }
}